Method for automatic segmentation of fuzzy boundary image based on active contour and deep learning

ABSTRACT

The present invention discloses a method for automatic segmentation of a fuzzy boundary image based on active contour and deep learning. In the method, firstly, a fuzzy boundary image is segmented using a deep convolutional neural network model to obtain an initial segmentation result; then, a contour of a region inside the image segmented using the deep convolutional neural network model is used as an initialized contour and a contour constraint of an active contour model; and the active contour model drives, through image characteristics of a surrounding region of each contour point, the contour to move towards a target edge to derive an accurate segmentation line between a target region and other background regions. The present invention introduces an active contour model on the basis of a deep convolutional neural network model to further refine a segmentation result of a fuzzy boundary image, which has the capability of segmenting a fuzzy boundary in the image, thus further improving the accuracy of segmentation of the fuzzy boundary image.

TECHNICAL FIELD

The present invention relates to the technical field of fuzzy boundary image processing, and in particular to a method for automatic segmentation of a fuzzy boundary image based on active contour and deep learning.

BACKGROUND

The difficulty of fuzzy image segmentation lies in the difficulty of accurately locating complex boundaries and correctly segmenting tiny isolated targets. Complex boundaries include situations of fuzzy boundaries, boundary disappearance, complex boundary interactions, and variable shapes. Ultrasonic images are a common kind of fuzzy images, and their low contrast and noisy characteristics tend to make the target edges fuzzy or even disappear, so the actual boundaries of the target are susceptible to artifacts, or even partially obscured by a large number of artifacts. Accurate segmentation of fuzzy boundary images becomes a challenge nowadays.

In recent years, deep convolutional neural network models have achieved remarkable results in semantic segmentation and remarkable results in low-contrast image processing. Fuzzy boundaries have certain ambiguity and are prone to noise in the training stage, which makes the deep model still have the problem of insufficient fuzzy boundary segmentation capability in the application of fuzzy boundary image segmentation. Among the traditional ultrasonic image segmentation methods, the active contour model based on level sets has the advantages of being insensitive to noise, being able to evolve the contour on the fuzzy boundary of the target and keeping the contour close to the target boundary. However, the active contour model needs to initialize the contour, and is thus difficult to cope with complex images. The deep convolutional neural network model has been able to achieve better fuzzy boundary image segmentation results, and applying the active contour model on such segmentation results can effectively alleviate the limitation of the initialized contour on the active contour model, and can further improve the fuzzy boundary segmentation capability and the accuracy of boundary segmentation results after the fine tuning of local regions.

The method for automatic segmentation of a fuzzy boundary image based on active contour and deep learning proposed in the present invention, in combination with an active contour model and a deep convolutional neural network model, is able to segment a fuzzy boundary image accurately.

SUMMARY

The method for automatic segmentation of a fuzzy boundary image based on active contour and deep learning of the present invention, while realizing automatic segmentation of a fuzzy boundary image, further improves the accuracy of fuzzy boundary segmentation, thus realizing accurate segmentation of a target with fuzzy boundaries in the image Firstly, a fuzzy boundary image is segmented using a deep learning model to obtain an initialized target segmentation result; and the segmentation result of the model is then fine-tuned using an active contour model to obtain a more accurate normal boundary and fuzzy boundary segmentation result. The deep active contour model proposed in the present invention uses the method of local evolution of contour points to drive the contour to move towards a target boundary, and at the same time, uses the initialized contour to constrain over-evolution of the contour.

The purpose of the present invention is achieved by at least one of the following technical schemes.

A method for automatic segmentation of a fuzzy boundary image based on active contour and deep learning, includes the following steps:

S1, segmenting a fuzzy boundary image using a deep learning model to obtain an initialized target segmentation result; and

S2, fine-tuning the segmentation result of the model using an active contour model to obtain a more accurate normal boundary and fuzzy boundary segmentation result, the step specifically comprising:

S2.1, initializing the active contour model using a region boundary in the initialized target segmentation result obtained in S1 to construct an initial level set;

S2.2, using the level set to represent an energy function, and obtaining a partial differential equation for curve evolution through the energy function;

S2.3, performing a judgment of a region in which a contour point is located; and

S2.4, after determining a region in which each contour point is located, calculating a value of the partial differential equation and evolving a contour through iterations until a maximum number of iterations is reached or the contour changes slightly or does not change, and then completing the segmentation.

Further, in step S2.1, the initial level set ϕ₁(x,y) of the active contour model is constructed from the segmentation result of the deep learning model, and the initial level set is defined as follows:

${\phi_{I}\left( {x,y} \right)} = \left\{ \begin{matrix} {{D\left( {x,y} \right)},{{R\left( {x,y} \right)} = 0}} \\ {{- {D\left( {x,y} \right)}},{{R\left( {x,y} \right)} = 1}} \end{matrix} \right.$

where R(x,y)={0,1} is the segmentation result of the deep learning model, R(x,y)=0 indicates that a point (x,y) belongs to a target region, and R(x,y)=1 indicates that the point (x,y) belongs to a non-target region; and points at a demarcation between the target region and the non-target region form a target boundary B, and D(x,y) is the shortest distance between each point (x,y) on the image and the target boundary B.

Further, in step S2.2, a total of three parts are included in the energy function: 1) the perimeter and area of the contour; 2) a contour local region energy; and 3) a contour constraint energy; and

the whole energy function is defined as follows:

$F = {{u \cdot {{Length}(C)}} + {v \cdot {{Area}\left( {{inside}(C)} \right)}} + {\lambda_{1}\left( {{\sum\limits_{p \in {N(C)}}{\int_{{ia}(p)}{{❘{{\mu_{0}\left( {x,y} \right)} - c_{ip}}❘}^{2}{dxdy}}}} + {\sum\limits_{p \in {B(C)}}{\int_{{ia}(p)}{{❘{{\mu_{0}\left( {x,y} \right)} - c_{ip} + c_{1}}❘}{dxdy}}}}} \right)} + {\lambda_{2}\left( {{\sum\limits_{p \in {N(C)}}{\int_{o{a(p)}}{{❘{{\mu_{0}\left( {x,y} \right)} - c_{op}}❘}^{2}{dxdy}}}} + {\sum\limits_{p \in {F(C)}}{\int_{o{a(p)}}{{❘{{\mu_{0}\left( {x,y} \right)} - c_{op} + c_{2}}❘}{dxdy}}}}} \right)} + {\frac{\lambda_{3}}{2}\left( {C - C_{0}} \right)^{2}}}$

where C denotes a current segmentation contour, C₀ denotes an initialized segmentation contour, Length (C) denotes the perimeter of the contour C, Area(inside(C)) denotes the area of a region inside the contour C, μ₀(x,y) is a pixel intensity of a source image I at (x,y), c₁ is a pixel intensity average inside the contour C, c₂ is a pixel intensity average outside the contour C, p is a point on the contour C, p ∈N(C) indicates that the contour point p is in a target edge region, p ∈F(C) indicates that the contour point p is in a foreground (target) region, p ∈B(C) indicates that the contour point p is in a background region, ia(p) is a point that is in the surrounding of the contour point p and inside the contour C, oa(p) is a point that is in the surrounding of the contour point p and outside the contour C, c_(ip) is a pixel intensity average of points that satisfy ia(p), c, is a pixel intensity average of points that satisfy oa(p), the surrounding of the contour point p refers to being in the range of a circle with P as the center and R as the radius; and a first term and a second term in the energy function denote the perimeter and area of the contour and serve to keep the contour continuous and smooth and are related only to the size and shape of the contour itself; a third term and a fourth term in the energy function denote a contour local region energy and serve to cause the contour to evolve towards a target boundary and is related to image data; and a fifth term in the energy function denotes a contour constraint energy and serves to limit the evolution of a current contour towards a region that greatly deviates from the initialized contour, and u, v, λ₁, λ₂, λ₃ are coefficients of the corresponding energy terms.

Further, in the energy function F, a level set method is used to denote the contour C as well as the inside and outside of the contour; and in the level set method, the contour C in an image domain Ω is denoted as a zero level set, i.e., ϕ=0, which is defined as follows:

$\left\{ {\begin{matrix} {C = \left\{ {{\left( {x,y} \right) \in {\Omega:{\phi\left( {x,y} \right)}}} = 0} \right\}} \\ {{{inside}(C)} = \left\{ {\left( {x,y} \right) \in {\Omega:{{\phi\left( {x,y} \right)} > 0}}} \right\}} \\ {{{outside}(C)} = \left\{ {\left( {x,y} \right) \in {\Omega:{{\phi\left( {x,y} \right)} < 0}}} \right\}} \end{matrix};} \right.$

the zero level set, i.e., ϕ=0, is used to denote the contour C; a Heaviside function H and a Dirac function δ₀ are defined as follows:

${H(z)} = \left\{ {\begin{matrix} {1,{{{if}z} \geq 0}} \\ {0,{{{if}z} < 0}} \end{matrix},{{{\delta_{0}(z)} = {\frac{d}{dz}{H(z)}}};}} \right.$

H is used to denote the inside and outside of the contour C:

$\left\{ {\begin{matrix} {{{inside}(C)} = {{H\left( {\phi\left( {x,y} \right)} \right)} = 1}} \\ {{{outside}(C)} = {{H\left( {\phi\left( {x,y} \right)} \right)} = 0}} \end{matrix};} \right.$

the level set ϕ, the function 11, and the function δ₀ are used to denote the perimeter and area of the contour:

Length{ϕ = 0} = ∫_(Ω)❘▽H(ϕ(x, y))❘dxdy = ∫_(Ω)δ₀(ϕ(x, y))❘▽ϕ(x, y)❘dxdy; andArea{ϕ > 0} = ∫_(Ω)H(ϕ(x, y))dxdy;

the contour constraint energy is the difference between the current contour C and the initialized contour C₀ and is denoted using the level set ϕ, the function H, and ϕ₁, and the contour constraint energy is denoted as the difference between the current level set ϕ and the initialized level set ϕ₁:

(C−C ₀)²=∫_(Ω)(H(ϕ(x,y)))−H(ϕ₁(x,y))²dxdy;

the contour local region energy is the sum of energies inside and outside the surrounding of all contour points; an energy of surrounding regions of the contour is calculated by calculating, separately for each contour point, energies inside and outside the contour in a local region of the contour point using a local calculation method and then superimposing the energies to obtain an overall energy; and after being denoted using the level set ϕ and the function H, terms in the energy of the surrounding regions of the contour are defined as follows:

${{{\sum\limits_{p \in {N(C)}}{\int_{{ia}(p)}{{❘{{\mu_{0}\left( {x,y} \right)} - c_{ip}}❘}^{2}{dxdy}}}} = {\sum\limits_{p \in {N(C)}}{\int_{a(p)}{{❘{{\mu_{0}\left( {x,y} \right)} - c_{ip}}❘}^{2}{H\left( {\phi\left( {x,y} \right)} \right)}{dxdy}}}}};{{\sum\limits_{p \in {B(C)}}{\int_{{ia}(p)}{{❘{{\mu_{0}\left( {x,y} \right)} - c_{ip} + c_{1}}❘}{dxdy}}}} = {\sum\limits_{p \in {B(C)}}{\int_{a(p)}{{❘{{\mu_{0}\left( {x,y} \right)} - c_{ip} + c_{1}}❘}{H\left( {\phi\left( {x,y} \right)} \right)}{dxdy}}}}};{{\sum\limits_{p \in {N(C)}}{\int_{{oa}(p)}{{❘{{\mu_{0}\left( {x,y} \right)} - c_{op}}❘}^{2}{dxdy}}}} = {\sum\limits_{p \in {N(C)}}{\int_{a(p)}{{❘{{\mu_{0}\left( {x,y} \right)} - c_{op}}❘}^{2}\left( {1 - {H\left( {\phi\left( {x,y} \right)} \right)}} \right){dxdy}}}}};{and}}{{\sum\limits_{p \in {F(C)}}{\int_{{oa}(p)}{{❘{{\mu_{0}\left( {x,y} \right)} - c_{op} + c_{2}}❘}{dxdy}}}} = {\sum\limits_{p \in {F(C)}}{\int_{a(p)}{{❘{{\mu_{0}\left( {x,y} \right)} - c_{op} + c_{2}}❘}\left( {1 - {H\left( {\phi\left( {x,y} \right)} \right)}} \right){dxdy}}}}}$

where for a point p(x_(p),y_(p)) on the contour point C, ϕ(p)=0 a(p) indicates a point that is in the surrounding of the contour point p, the surrounding of the contour point p referring to being in the range of a circle with P as the center and R as the radius; ia(p) denotes a point that is in the surrounding of the contour point p and inside the contour C and for a point a(x_(a), y_(a)) satisfying ia(p), ϕ(x_(a), y_(a))>0 and √{square root over ((x_(a)−x_(p))²+(y_(a)−y_(p))²)}≤R; and oa(p) denotes a point that is in the surrounding of the contour point p and outside the contour C, and for a point a(x_(a), y_(a)) satisfying oa(p), ϕ(x_(a),y_(a))<0 and √{square root over ((x_(a)−x_(p))²+(y_(a)−y_(p))²)}≤R.

Further, after denoting the energy terms using the level set method, the energy function F is defined as:

$F = {{\mu{\int_{\Omega}{{\delta_{0}\left( {\phi\left( {x,y} \right)} \right)}{❘{\bigtriangledown{\phi\left( {x,y} \right)}}❘}{dxdy}}}} + {v{\int_{\Omega}{{H\left( {\phi\left( {x,y} \right)} \right)}{dxdy}}}} + {\lambda_{1}\left( {{\sum\limits_{p \in {N(C)}}{\int_{a(p)}{{❘{{\mu_{0}\left( {x,y} \right)} - c_{ip}}❘}^{2}{H\left( {\phi\left( {x,y} \right)} \right)}{dxdy}}}} + {\sum\limits_{p \in {B(C)}}{\int_{a(p)}{{❘{{\mu_{0}\left( {x,y} \right)} - c_{ip} + c_{1}}❘}{H\left( {\phi\left( {x,y} \right)} \right)}{dxdy}}}}} \right)} + {\lambda_{2}\left( {{\sum\limits_{p \in {N(C)}}{\int_{a(p)}{{❘{{\mu_{0}\left( {x,y} \right)} - c_{op}}❘}^{2}\left( {1 - {H\left( {\phi\left( {x,y} \right)} \right)}} \right){dxdy}}}} + {\sum\limits_{p \in {F(C)}}{\int_{a(p)}{{❘{{\mu_{0}\left( {x,y} \right)} - c_{op} + c_{2}}❘}\left( {1 - {H\left( {\phi\left( {x,y} \right)} \right)}} \right){dxdy}}}}} \right)} + {\frac{\lambda_{3}}{2}{\int_{\Omega}\left( {H\left( {\phi\left( {x,y} \right)} \right)} \right)}} - {{H\left( {\phi_{I}\left( {x,y} \right)} \right)}^{2}{dxdy}}}$

where c₁ is the pixel intensity average inside the contour C, and c₂ is the pixel intensity average outside the contour C, which satisfy, respectively: c₁(ϕ)=average (u₀) in {ϕ≥0}, c₂(ϕ)=average (u₀) in {ϕ<0}; and c₁ and c₂ are defined through the level set ϕ as follows:

${{c_{1} = \frac{\int_{\Omega}{{u_{0}\left( {x,y} \right)}{H\left( {\phi\left( {x,y} \right)} \right)}{dxdy}}}{\int_{\Omega}{{H\left( {\phi\left( {x,y} \right)} \right)}{dxdy}}}};{and}}{c_{2} = \frac{\int_{\Omega}{{u_{0}\left( {x,y} \right)}\left( {1 - {H\left( {\phi\left( {x,y} \right)} \right)}} \right){dxdy}}}{\int_{\Omega}{\left( {1 - {H\left( {\phi\left( {x,y} \right)} \right)}} \right){dxdy}}}}$

where c_(ip) is a pixel intensity average of points satisfying ia(p) and c_(op) is a pixel intensity average of points satisfying oa(p); and c_(ip)(φ)=average(μ₀) in {a(p) and φ≥0} and c_(op)(φ)=average(μ₀) in {a(p) and φ<0} are defined as follows:

${{c_{ip} = \frac{\int_{a(p)}{{u_{0}\left( {x,y} \right)}{H\left( {{\phi\left( {x,y} \right)}{dxdy}} \right.}}}{\int_{a(p)}{{H\left( {\phi\left( {x,y} \right)} \right)}{dxdy}}}};{and}}{{c_{op} = \frac{\int_{a(p)}{{u_{0}\left( {x,y} \right)}\left( {1 - {H\left( {\phi\left( {x,y} \right)} \right)}} \right){dxdy}}}{\int_{a(p)}{\left( {1 - {H\left( {\phi\left( {x,y} \right)} \right)}} \right){dxdy}}}};}$

and

a partial differential equation for curve evolution is obtained from the energy function F by means of a Euler-Lagrange variational method and a gradient descent flow as follows:

$\frac{\partial\phi}{\partial t} = {\delta_{s}\left\lbrack {{u{{div}\left( \frac{\bigtriangledown\phi}{❘{\bigtriangledown\phi}❘} \right)}} - v - {\lambda_{1}\left( {{\sum\limits_{{p \in {N(C)}},{{({x,y})} \in {a(p)}}}\left( {{u_{0}\left( {x,y} \right)} - c_{ip}} \right)^{2}} - {\sum\limits_{{p \in {B(C)}},{{({x,y})} \in {a(p)}}}\left( {{u_{0}\left( {x,y} \right)} - c_{ip} + c_{1}} \right)^{2}}} \right)} + {\lambda_{2}\left( {{\sum\limits_{{p \in {N(C)}},{{({x,y})} \in {a(p)}}}\left( {{u_{0}\left( {x,y} \right)} - c_{ip}} \right)^{2}} - {\sum\limits_{{p \in {F(C)}},{{({x,y})} \in {a(p)}}}\left( {{u_{0}\left( {x,y} \right)} - c_{ip} + c_{2}} \right)^{2}}} \right)} + {\lambda_{3}\left( {{H_{\varepsilon}(\phi)} - {H_{\varepsilon}\left( \phi_{I} \right)}} \right)}} \right\rbrack}$

where

${{H_{\varepsilon}(z)} = {\frac{1}{2}\left( {1 + {\frac{2}{\pi}{\arctan\left( \frac{z}{\varepsilon} \right)}}} \right)}},{{\delta_{\varepsilon}(z)} = \frac{\varepsilon}{\pi\left( {\varepsilon^{2} + z^{2}} \right)}},$

and (x,y)∈a(p) indicates that the point (x y) is in the surrounding of the contour point p, the surrounding of the contour point p referring to being in the range of a circle with P as the center and R as the radius; and in the process of curve evolution, the level set of the nth iteration is ϕ^(n) and the level set of the (n+1)th iteration is

${\phi^{n + 1} = {\phi^{n} + {\Delta t\frac{\partial\phi}{\partial t}}}},$

and partial derivatives in the horizontal direction and the vertical direction of a two-dimensional image are calculated using a finite difference approach.

Further, in step S2.3, it is judged whether the contour point p is in a target edge region or a non-target edge region by the difference between pixel intensities inside and outside the contour, and the specific method is as follows: in the fuzzy boundary image, the difference between the pixel intensity averages inside and outside the surrounding of the contour is larger in the target edge region, while the difference between the pixel intensity averages inside and outside the surrounding of the contour is smaller in the non-target edge region; and when the contour point P is in the non-target edge region, the values of c_(ip) and c_(op) are close to each other, i.e., c_(ip)≈c_(op), |c_(ip)−c_(op)|≤c_(d), c_(d) being a threshold for judging whether c_(ip) is close to c_(op) and the judgment is performed through the following steps:

S2.3.1, calculating the difference d_(p) between c_(ip) and c_(op) for each contour point on the contour in counterclockwise order, and constructing a closed-loop queue D in an order obtained through d_(p);

S2.3.2, smoothing the closed-loop queue D using a Gaussian filter of width R;

S2.3.3, searching for a fragment ΔC that is longer than 2R and satisfies d_(p)≤c_(d) in the closed-loop queue D; and

S2.3.4, if there exists a fragment satisfying step S2.3.3, all contour points in the fragment are in the non-target edge region and the other contour points are in the target edge region; and

the sum of energies inside the contour in local regions of contour points in the target edge region is as follows:

${\sum\limits_{p \in {N(C)}}{\int_{a(p)}{{❘{{\mu_{0}\left( {x,y} \right)} - c_{ip}}❘}^{2}{H\left( {\phi\left( {x,y} \right)} \right)}{dxdy}}}};$

the sum of energies outside the contour in local regions of contour points in the target edge region is as follows:

$\sum\limits_{p \in {N(C)}}{\int_{a(p)}{{❘{{\mu_{0}\left( {x,y} \right)} - c_{op}}❘}^{2}\left( {1 - {H\left( {\phi\left( {x,y} \right)} \right)}} \right){{dxdy}.}}}$

Further, in response to the contour point p being in the non-target edge region, it is further determined whether the contour point p is in a foreground region or a background region; and since the characteristics of a surrounding region of a contour point are similar to those of a region in which the contour point is located, the fuzzy boundary image is divided into several subregions according to image characteristics, and then, for these subregions, it is determined whether the contour point p is in the foreground region or the background region, and the specific method is as follows:

S2.3.5, firstly, dividing the fuzzy boundary image into several subregions according to image characteristics, and determining a subregion O in which the contour fragment ΔC is located;

S2.3.6, establishing a two-dimensional coordinate system in the image subregion O with the coordinate position of a contour point in the middle of the contour fragment ΔC as the center point center (x₀, y₀) of a two-dimensional Gaussian function ƒ(x,y), with ⅙ of the maximum distance of x₀ from a boundary of the subregion as the standard deviation σ_(x) of the X-axis portion of the Gaussian function, and with ⅙ of the maximum distance of y, from the boundary of the subregion as the standard deviation σ_(y) of the Y-axis portion of the Gaussian function; and assigning a weight w_(ij) to each point in the subregion using the two-dimensional Gaussian function and normalizing weights w_(ij) for the inside and outside of the contour, respectively, to obtain normalized weights w_(ij_in) for the inside of the contour and normalized weights w_(ij_out) for the outside of the contour;

S2.3.7, calculating averages c_(o1) and c_(o2) for the inside and outside of the contour in the subregion O using the normalized weights w_(ij_in) and w_(ij_out) and a pixel intensity μ₀(i,j), wherein when the point (i,j) is inside the contour in the subregion O

${c_{o1} = \frac{\sum{w_{{ij}\_ in} \cdot {\mu_{0}\left( {i,j} \right)}}}{N}},$

N being the number of points inside the contour in the subregion O; and when the point (i,j) is outside the contour in the subregion O,

${c_{o2} = \frac{\sum{w_{{ij}\_{out}} \cdot {\mu_{0}\left( {i,j} \right)}}}{M}},$

M being the number of points outside the contour in the subregion O; and

S2.3.8, calculating a pixel intensity average m_(Δc) of surrounding regions of all contour points in the contour fragment ΔC, and comparing the differences between m_(Δc) and c_(o1) and c_(o2), wherein if |m_(Δc)−c_(o1)|≤|m_(Δc)−c_(o2)|, the contour points in the contour fragment ΔC are in the foreground region, and otherwise in the background region.

Further, if the contour point p is in the foreground region, the direction of evolution of the contour point p is towards the outside of the contour, wherein in the energy function, the correction of the direction of evolution is embodied in increasing the energy of the outside of the contour in a local region of the foreground contour point, with the increased energy being defined as:

${\sum\limits_{p \in {F(C)}}{\int_{a(p)}{{❘{{\mu_{0}\left( {x,y} \right)} - c_{op} + c_{2}}❘}\left( {1 - {H\left( {\phi\left( {x,y} \right)} \right)}} \right){dxdy}}}};$

if the contour point p is in the background region, the direction of evolution ofthe contour point p is towards the inside of the contour, wherein in the energy function, the correction of the direction of evolution is embodied in increasing the energy of the inside of the contour in a local region of the background contour point, with the increased energy being defined as:

$\left. {\sum\limits_{p \in {B(C)}}{\int_{a(p)}{{❘{{\mu_{0}\left( {x,y} \right)} - c_{ip} + c_{1}}❘}{H\left( {\phi\left( {x,y} \right)} \right)}{dxdy}}}} \right).$

Further, in step S2.4 the contour is evolved through iterations of

$\phi^{n + 1} = {\phi^{n} + {\Delta t\frac{\partial\phi}{\partial t}}}$

until a maximum number of iterations iter is reached or the contour changes slightly or does not change, where 200≤iter≤10000; and a contour change

${{\Delta h} = {\sum\limits_{i,j}\left( {❘\left. {{H\left( \phi_{i,j}^{n + 1} \right)} - {H\left( \phi_{i,j}^{n} \right)}} \right|} \right)}},$

which indicates changing of the contour, and the iteration stops in response to a plurality of successive slight changes of the contour.

Compared with the prior art, the present invention has the advantages:

The present invention applies an active contour model to the field of fuzzy boundary image segmentation, and further optimizes the segmentation result of a deep convolutional neural network model. During construction of the energy function, firstly, the energy associated with image pixels is obtained by superposing and calculating the characteristics of a surrounding region of each contour point, and at the same time, the judgment of a region in which the contour point is located and the correction of the direction of evolution of the contour point are introduced, thus causing this method to be capable of segmenting fuzzy boundaries and improving the accuracy of boundary segmentation.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 illustrates a thyroid ultrasonic image, which is an original fuzzy boundary image, in an embodiment of the present invention.

FIG. 2 illustrates a middle boundary label image of the embodiment of the present invention, where the white line indicates the schematic diagram of a thyroid region.

FIG. 3 illustrates a schematic diagram of the result of segmenting the thyroid region based on a U-Net deep convolutional neural network in the embodiment of the present invention.

FIG. 4 illustrates a schematic diagram of the result of segmenting the thyroid region based on a deep model U-Net and an active contour model in the embodiment of the present invention.

FIG. 5 illustrates a schematic diagram of a local region of a contour point p in the embodiment of the present invention.

FIG. 6 illustrates a schematic diagram of a thyroid ultrasonic transverse scanned image and the division of subregions in the embodiment of the present invention.

FIG. 7 illustrates a schematic diagram of a thyroid ultrasonic longitudinal scanned image and the division of subregions in the embodiment of the present invention.

FIG. 8 illustrates a flowchart of steps of the embodiment of the present invention.

DETAILED DESCRIPTION

The specific implementation of the present invention will be further described with reference to the drawings and embodiments below, which, however, should not be construed as a limitation on the implementation and scope of protection of the present invention. It should be noted that details which are not set forth below can be implemented by those skilled in the art with reference to the prior art.

Embodiment

A method for automatic segmentation of a fuzzy boundary image based on active contour and deep learning, as shown in FIG. 8 , includes the following steps:

In S1, for a fuzzy boundary image, such as a thyroid ultrasonic image shown in FIG. 1 , a thyroid region is segmented using a trained U-Net convolutional neural network model to obtain a U-Net segmentation result image.

In S2, the segmentation result of the model is fine-tuned using an active contour model to obtain a more accurate normal boundary and fuzzy boundary segmentation result, as shown in FIG. 8 , the step specifically including the following steps:

In S2.1, the active contour model is initialized using a boundary of the thyroid region in FIG. 3 to construct an initial level set ϕ₁(x,y); parameters of the active contour model are set as follows: μ=1,v=0, λ₁=1, λ₂=1, λ₃=1, Δt=0.1, R=8, c_(d)=8, ε=1; and the initial level set is defined as follows:

${\phi_{I}\left( {x,y} \right)} = \left\{ \begin{matrix} {{D\left( {x,y} \right)},{{R\left( {x,y} \right)} = 0}} \\ {{- {D\left( {x,y} \right)}},{{R\left( {x,y} \right)} = 1}} \end{matrix} \right.$

where R(x,y)={0,1} is the segmentation result of the deep learning model, R(x,y)=0 indicates that a point (x,y) belongs to a target region, and R(x,y)=1 indicates that the point (x,y) belongs to a non-target region; and points at a demarcation between the target region and the non-target region form a target boundary B, and D(x,y) is the shortest distance between each point (x,y) on the image and the target boundary B.

In S2.2, the level set is used to represent an energy function, and a partial differential equation for curve evolution is obtained through the energy function, where

a total of three parts are included in the energy function: 1) the perimeter and area of the contour; 2) a contour local region energy; and 3) a contour constraint energy; and

the whole energy function is defined as follows:

$F = {{{u \cdot {Length}}(C)} + {{v \cdot {Area}}\left( {{inside}(C)} \right)} + {\lambda_{1}\left( {{\sum\limits_{p \in {N(C)}}{\int_{{ia}(p)}{{❘{{\mu_{0}\left( {x,y} \right)} - c_{ip}}❘}^{2}{dxdy}}}} + \text{ }{\sum\limits_{p \in {B(C)}}{\int_{{ia}(p)}{{❘{{\mu_{0}\left( {x,y} \right)} - c_{ip} + c_{1}}❘}{dxdy}}}}} \right)} + {\lambda_{2}\left( {{\sum\limits_{p \in {N(C)}}{\int_{{oa}(p)}{{❘{{\mu_{0}\left( {x,y} \right)} - c_{op}}❘}^{2}{dxdy}}}} + {\sum\limits_{p \in {F(C)}}{\int_{{oa}(p)}{{❘{{\mu_{0}\left( {x,y} \right)} - c_{op} + c_{2}}❘}{dxdy}}}}} \right)} + {\frac{\lambda_{3}}{2}\left( {C - C_{0}} \right)^{2}}}$

where C denotes a current segmentation contour, C₀ denotes an initialized segmentation contour, Length (C) denotes the perimeter of the contour C, Area(inside(C)) denotes the area of a region inside the contour C, μ₀(x,y) is a pixel intensity of a source image I at (x,y), c₁ is a pixel intensity average inside the contour C, c₂ is a pixel intensity average outside the contour C, p is a point on the contour C, p ∈N(C) indicates that the contour point p is in a target edge region, p ∈F(C) indicates that the contour point p is in a foreground (target) region, p ∈B(C) indicates that the contour point p is in a background region, ia(p) is a point that is in the surrounding of the contour point p and inside the contour C, oa(p) is a point that is in the surrounding of the contour point p and outside the contour C, c_(ip) is a pixel intensity average of points that satisfy ia(p), c_(op) is a pixel intensity average of points that satisfy oa(p), the surrounding of the contour point p refers to being in the range of a circle with P as the center and R as the radius; and a first term and a second term in the energy function denote the perimeter and area of the contour and serve to keep the contour continuous and smooth and are related only to the size and shape of the contour itself; a third term and a fourth term in the energy function denote a contour local region energy and serve to cause the contour to evolve towards a target boundary and is related to image data; and a fifth term in the energy function denotes a contour constraint energy and serves to limit the evolution of a current contour towards a region that greatly deviates from the initialized contour, and u, v, λ₁, λ₂, λ₃ are coefficients of the corresponding energy terms.

Further, in the energy function F, a level set method is used to denote the contour C as well as the inside and outside of the contour; and in the level set method, the contour C in an image domain Ω is denoted as a zero level set, i e., ϕ=0, which is defined as follows:

$\left\{ {\begin{matrix} {C = \left\{ {{\left( {x,y} \right) \in {\Omega:{\phi\left( {x,y} \right)}}} = 0} \right\}} \\ {{{inside}(C)} = \left\{ {\left( {x,y} \right) \in {{\Omega:{\phi\left( {x,y} \right)}} > 0}} \right\}} \\ {{{outside}(C)} = \left\{ {\left( {x,y} \right) \in {{\Omega:\phi\left( {x,y} \right)} > 0}} \right\}} \end{matrix};} \right.$

the zero level set, i.e., ϕ=0, is used to denote the contour C;

a Heaviside function H and a Dirac function δ₀ are defined as follows:

${H(z)} = \left\{ {\begin{matrix} {1,} & {{{if}z} \geq 0} \\ {0,} & {{{if}z} < 0} \end{matrix},{{{\delta_{0}(z)} = {\frac{d}{dz}{H(z)}}};}} \right.$

H is used to denote the inside and outside of the contour C

$\left\{ {\begin{matrix} {{{inside}(C)} = {H\left( {{\phi\left( {x,y} \right)} = 1} \right.}} \\ {{{outside}(C)} = {H\left( {{\phi\left( {x,y} \right)} = 0} \right.}} \end{matrix};} \right.$

the level set ϕ, the function H and the function δ₀ are used to denote the perimeter and area of the contour:

Length{ϕ = 0} = ∫_(Ω)❘∇H(ϕ(x, y))❘dxdy = ∫_(Ω)δ₀(ϕ(x, y))❘∇ϕ(x, y)❘dxdy; and Area{ϕ > 0} = ∫_(Ω)H(ϕ(x, y))dxdy;

the contour constraint energy is the difference between the current contour C and the initialized contour C₀, and is denoted using the level set ϕ, the function H, and ϕ₁, and the contour constraint energy is denoted as the difference between the current level set ϕ and the initialized level set ϕ₁:

(C−C ₀)²=∫_(Ω)(H(ϕ(x,y)))−H(ϕ₁(x,y))²dxdy;

the contour local region energy is the sum of energies inside and outside the surrounding of all contour points; an energy of surrounding regions of the contour is calculated by calculating, separately for each contour point, energies inside and outside the contour in a local region of the contour point using a local calculation method and then superimposing the energies to obtain an overall energy; and after being denoted using the level set ϕ and the function H, terms in the energy of the surrounding regions of the contour are defined as follows:

${{{\sum\limits_{p \in {N(C)}}{\int_{{ia}(p)}{{❘{{\mu_{0}\left( {x,y} \right)} - c_{ip}}❘}^{2}{dxdy}}}} = {\sum\limits_{p \in {N(C)}}{\int_{a(p)}{{❘{{\mu_{0}\left( {x,y} \right)} - c_{ip}}❘}^{2}{H\left( {\phi\left( {x,y} \right)} \right)}{dxdy}}}}};}{{{\sum\limits_{p \in {B(C)}}{\int_{{ia}(p)}{{❘{{\mu_{0}\left( {x,y} \right)} - c_{ip} + c_{1}}❘}{dxdy}}}} = {\sum\limits_{p \in {B(C)}}{\int_{a(p)}{{❘{{\mu_{0}\left( {x,y} \right)} - c_{ip} + c_{1}}❘}{H\left( {\phi\left( {x,y} \right)} \right)}{dxdy}}}}};}{{{\sum\limits_{p \in {N(C)}}{\int_{{oa}(p)}{{❘{{\mu_{0}\left( {x,y} \right)} - c_{op}}❘}^{2}{dxdy}}}} = {\sum\limits_{p \in {N(C)}}{\int_{a(p)}{{❘{{\mu_{0}\left( {x,y} \right)} - c_{op}}❘}^{2}\left( {1 - {H\left( {\phi\left( {x,y} \right)} \right)}} \right){dxdy}}}}};{and}}{{\sum\limits_{p \in {F(C)}}{\int_{{oa}(p)}{{❘{{\mu_{0}\left( {x,y} \right)} - c_{op} + c_{2}}❘}{dxdy}}}} = {\sum\limits_{p \in {F(C)}}{\int_{{oa}(p)}{{❘{{\mu_{0}\left( {x,y} \right)} - c_{op} + c_{2}}❘}\left( {1 - {H\left( {\phi\left( {x,y} \right)} \right)}} \right){dxdy}}}}}$

where for a point p(x_(p),y_(p)) on the contour point C, ϕ(p)=0 a(p) indicates a point that is in the surrounding of the contour point p, the surrounding of the contour point p referring to being in the range of a circle with P as the center and R as the radius; ia(p) denotes a point that is in the surrounding of the contour point p and inside the contour C and for a point a(x_(a), y_(a)) satisfying ia(p), ϕ(x_(a),y_(a))>0 and √{square root over ((x_(a)−x_(p))²+(y_(a)−y_(p))²)}≤R, and oa(p) denotes a point that is in the surrounding of the contour point p and outside the contour C and for a point al(x_(a),y_(a)) satisfying oa(p), ϕ(x_(a),y_(a))≤0 and √{square root over ((x_(a)−x_(p))²+(y_(a)−y_(p))²)}≤R.

Further, after denoting the energy terms using the level set method, the energy function F is defined as:

$F = {{\mu{\int_{\Omega}{{\delta_{0}\left( {\phi\left( {x,y} \right)} \right)}{❘{\nabla{\phi\left( {x,y} \right)}}❘}{dxdy}}}} + {v{\int_{\Omega}{{H\left( {\phi\left( {x,y} \right)} \right)}{dxdy}}}} + {\lambda_{1}\left( {{\sum\limits_{p \in {N(C)}}{\int_{a(p)}{{❘{{\mu_{0}\left( {x,y} \right)} - c_{ip}}❘}^{2}{H\left( {\phi\left( {x,y} \right)} \right)}{dxdy}}}} + {\sum\limits_{p \in {B(C)}}{\int_{a(p)}{{❘{{\mu_{0}\left( {x,y} \right)} - c_{ip} + c_{1}}❘}{H\left( {\phi\left( {x,y} \right)} \right)}{dxdy}}}}} \right)} + {\lambda_{2}\left( {{\sum\limits_{p \in {N(C)}}{\int_{a(p)}{{❘{{\mu_{0}\left( {x,y} \right)} - c_{op}}❘}^{2}\left( {1 - {H\left( {\phi\left( {x,y} \right)} \right)}} \right){dxdy}}}} + {\sum\limits_{p \in {F(C)}}{\int_{{oa}(p)}{{❘{{\mu_{0}\left( {x,y} \right)} - c_{op} + c_{2}}❘}\left( {1 - {H\left( {\phi\left( {x,y} \right)} \right)}} \right){dxdy}}}}} \right)} + {\frac{\lambda_{3}}{2}{\int_{\Omega}\left( {H\left( {\phi\left( {x,y} \right)} \right)} \right)}} - {{H\left( {\phi_{I}\left( {x,y} \right)} \right)}^{2}{dxdy}}}$

where c₁ is the pixel intensity average inside the contour C, and c₂ is the pixel intensity average outside the contour C, which satisfy, respectively: c₁(ϕ)=average (μ₀) in {ϕ≥0}, c₂ (ϕ)=average (μ₀) in {ϕ<0 } and c₁ and c₂ are defined through the level set ϕ as follows:

${{c_{1} = \frac{\int_{\Omega}{{u_{0}\left( {x,y} \right)}{H\left( {\phi\left( {x,y} \right)} \right)}{dxdy}}}{\int_{\Omega}{{H\left( {\phi\left( {x,y} \right)} \right)}{dxdy}}}};{and}}{c_{2} = \frac{\int_{\Omega}{{u_{0}\left( {x,y} \right)}\left( {1 - {H\left( {\phi\left( {x,y} \right)} \right)}} \right){dxdy}}}{\int_{\Omega}{\left( {1 - {H\left( {\phi\left( {x,y} \right)} \right)}} \right){dxdy}}}}$

where c_(ip) is a pixel intensity average of points satisfying ia(p) and c_(op) is a pixel intensity average of points satisfying oa(p); and c_(ip) average(μ₀) in {a(p) and φ≥0} and c_(op)(φ)=average(μ₀) in {a(p) and φ<0} are defined as follows:

${{c_{ip} = \frac{\int_{a(p)}{{u_{0}\left( {x,y} \right)}{H\left( {\phi\left( {x,y} \right)} \right)}{dxdy}}}{\int_{a(p)}{{H\left( {\phi\left( {x,y} \right)} \right)}{dxdy}}}};{and}}{{c_{op} = \frac{\int_{a(p)}{{u_{0}\left( {x,y} \right)}\left( {1 - {H\left( {\phi\left( {x,y} \right)} \right)}} \right){dxdy}}}{\int_{a(p)}{\left( {1 - {H\left( {\phi\left( {x,y} \right)} \right)}} \right){dxdy}}}};}$

a partial differential equation for curve evolution is obtained from the energy function F by means of a Euler-Lagrange variational method and a gradient descent flow as follows:

$\frac{\partial\phi}{\partial t} = {\delta_{\varepsilon}\left\lbrack {{u{{div}\left( \frac{\nabla\phi}{❘{\nabla\phi}❘} \right)}} - v - {\lambda_{1}\left( {{\sum\limits_{{p \in {N(C)}},{{({x,y})} \in {a(p)}}}\left( {{u_{0}\left( {x,y} \right)} - c_{ip}} \right)^{2}} - {\sum\limits_{{p \in {B(C)}},{{({x,y})} \in {a(p)}}}\left( {{u_{0}\left( {x,y} \right)} - c_{ip} + c_{1}} \right)^{2}}} \right)} + {\lambda_{2}\left( {{\sum\limits_{{p \in {N(C)}},{{({x,y})} \in {a(p)}}}\left( {{u_{0}\left( {x,y} \right)} - c_{ip}} \right)^{2}} - {\sum\limits_{{p \in {F(C)}},{{({x,y})} \in {a(p)}}}\left( {{u_{0}\left( {x,y} \right)} - c_{ip} + c_{2}} \right)^{2}}} \right)} + {\lambda_{3}\left( {{H_{\varepsilon}(\phi)} - {H_{\varepsilon}\left( \phi_{I} \right)}} \right)}} \right\rbrack}$

where

${{H_{\varepsilon}(z)} = {\frac{1}{2}\left( {1 + {\frac{2}{\pi}{\arctan\left( \frac{z}{\varepsilon} \right)}}} \right)}},{{\delta_{\varepsilon}(z)} = \frac{\varepsilon}{\pi\left( {\varepsilon^{2} + z^{2}} \right)}},$

and (x,y)∈a(p) indicates that the point (x,y) is in the surrounding of the contour point p, the surrounding of the contour point p referring to being in the range of a circle with P as the center and R as the radius; and in the process of curve evolution, the level set of the nth iteration is ϕ″ and the level set of the (n+1)th iteration is

${\phi^{n + 1} = {\phi^{n} + {\Delta t\frac{\partial\phi}{\partial t}}}},$

and partial derivatives in the horizontal direction and the vertical direction of a two-dimensional image are calculated using a finite difference approach.

In S2.3, a judgment of a region in which a contour point is located is performed. As shown in FIG. 5 , the black line block denotes an image region, the closed black curve is the contour C, the region inside the contour C is denoted as Inside (C), the region outside of the contour C is denoted as Outside (C), a point p is a point on the contour C, ia(p) is a region in the surrounding of the contour point p and inside the contour C, oa(p) is a region in the surrounding of the contour point p and outside the contour C, and the surrounding of the contour point p refers to being in the range of a circle with P as the center and R as the radius, such as the circle drawn by the black dashed line in the figure.

It is judged whether the contour point p is in a target edge region or a non-target edge region by the difference between pixel intensities inside and outside the contour, and the specific method is as follows: in the fuzzy boundary image, the difference between the pixel intensity averages inside and outside the surrounding of the contour is larger in the target edge region, while the difference between the pixel intensity averages inside and outside the surrounding of the contour is smaller in the non-target edge region; and when the contour point p is in the non-target edge region, the values of c_(ip) and c_(op), are close to each other, i.e., c_(ip)˜c_(op), |c_(ip)−c_(p)|≤c_(d), c_(d) being a threshold for judging whether c_(ip) is close to c_(op), and as shown in FIG. 8 , the judgment is performed through the following steps:

in S2.3.1, the difference d_(p) between c_(ip), and c_(op) for each contour point on the contour is calculated in counterclockwise order, and a closed-loop queue D is constructed in an order obtained through d_(p);

in S2.3.2, the closed-loop queue D is smoothed using a Gaussian filter of width R;

in S2.3.3, a fragment ΔC that is longer than 2R and satisfies d_(p)≤c_(d) is searched for in the closed-loop queue D; and

in S2.3.4, if there exists a fragment satisfying step S2.3.3, all contour points in the fragment are in the non-target edge region and the other contour points are in the target edge region; and the sum of energies inside the contour in local regions of contour points in the target edge region is as follows:

${\sum\limits_{p \in {N(C)}}{\int_{a(p)}{{❘{{\mu_{0}\left( {x,y} \right)} - c_{ip}}❘}^{2}{H\left( {\phi\left( {x,y} \right)} \right)}{dxdy}}}};$

the sum of energies outside the contour in local regions of contour points in the target edge region is as follows:

$\sum\limits_{p \in {N(C)}}{\int_{a(p)}{{❘{{\mu_{0}\left( {x,y} \right)} - c_{op}}❘}^{2}\left( {1 - {H\left( {\phi\left( {x,y} \right)} \right)}} \right){{dxdy}.}}}$

Further, in response to the contour point p being in the non-target edge region, it is further determined whether the contour point p is in a foreground region or a background region; and since the characteristics of a surrounding region of a contour point are similar to those of a region in which the contour point is located, the fuzzy boundary image is divided into several subregions according to image characteristics, and then, for these subregions, it is determined whether the contour point p is in the foreground region or the background region. In this embodiment, thyroid ultrasonic images are used as test images. The thyroid ultrasonic images are classified into a transverse scanned image and a longitudinal scanned image, as shown in FIGS. 6 and 7 . The left and right segmentation line in FIG. 6 separates the bronchial and carotid regions, and the upper and lower segmentation line reduces the effect of acoustic attenuation, where the pixel intensity in part of the thyroid ultrasonic image decreases with depth and the upper part is generally brighter than 1R the lower part, while dividing the muscle region. The upper and lower segmentation line in FIG. 7 similarly reduces the effect of acoustic attenuation while dividing the muscle region. In these subregions, for the subregions A, B, C, and D, it is determined whether the contour point p is in the foreground region or the background region, and the specific steps are as follows:

in S2.3.5, firstly, the fuzzy boundary image is divided into several subregions according to image characteristics, and a subregion O ∈{A, B, C, D} in which the contour fragment ΔC is located is determined;

in S23.6, a two-dimensional coordinate system is established in the image subregion O with the coordinate position of a contour point in the middle of the contour fragment ΔC as the center point center(x₀,y₀), thus obtaining a two-dimensional Gaussian function

${{f\left( {x,y} \right)} = {\exp\left( {- \left( {\frac{\left( {x - x_{0}} \right)^{2}}{2\sigma_{x}^{2}} + \frac{\left( {y - y_{0}} \right)^{2}}{2\sigma_{y}^{2}}} \right)} \right)}},$

with ⅙ of the maximum distance of x₀ from a boundary of the subregion as the standard deviation a, of the X-axis portion of the Gaussian function, and with ⅙ of the maximum distance of y, from the boundary of the subregion as the standard deviation σ_(y) of the Y-axis portion of the Gaussian function; and a weight IV, is assigned to each point in the subregion using the two-dimensional Gaussian function and weights W, for the inside and outside of the contour are normalized, respectively, to obtain normalized weights w_(ij_in) for the inside of the contour and normalized weights w_(ij_out) for the outside of the contour;

in S2.3.7, averages c_(o1) and c_(o2) for the inside and outside of the contour in the subregion O are calculated using the normalized weights w_(ij_in) and w_(ij_out) and a pixel intensity μ₀(i,j), where when the point (i,j) is inside the contour in the subregion O,

${c_{o1} = \frac{\sum{w_{ij\_ in} \cdot {\mu_{0}\left( {i,j} \right)}}}{N}},$

N being the number of points inside the contour in the subregion O; and when the point (I,j) is outside the contour in the subregion O,

${c_{o2} = \frac{\sum{w_{ij\_ out} \cdot {\mu_{0}\left( {i,j} \right)}}}{M}},$

M being the number of points outside the contour in the subregion O; and

in S2.3.8, a pixel intensity average mA of surrounding regions of all contour points in the contour fragment ΔC is calculated, and the differences between m_(Δc) and c_(o1) and c_(o2) are compared, where if mA|m_(Δc)−c_(o1)|≤|m_(Δc)−c_(o2)| the contour points in the contour fragment ΔC are in the foreground region, and otherwise the contour points are in the background region; and

if the contour point p is in the foreground region, the direction of evolution of the contour point p is towards the outside of the contour, wherein in the energy function, the correction of the direction of evolution is embodied in increasing the energy of the outside of the contour in a local region of the foreground contour point, with the increased energy being defined as:

${\sum\limits_{p \in {F(C)}}{\int_{a(p)}{{❘{{\mu_{0}\left( {x,y} \right)} - c_{op} + c_{2}}❘}\left( {1 - {H\left( {\phi\left( {x,y} \right)} \right)}} \right){dxdy}}}};$

if the contour point p is in the background region, the direction of evolution of the contour point p is towards the inside of the contour, wherein in the energy function, the correction of the direction of evolution is embodied in increasing the energy of the inside of the contour in a local region of the background contour point, with the increased energy being defined as:

$\left. {\sum\limits_{p \in {B(C)}}{\int_{a(p)}{{❘{{\mu_{0}\left( {x,y} \right)} - c_{ip} + c_{1}}❘}{H\left( {\phi\left( {x,y} \right)} \right)}{dxdy}}}} \right).$

In S2.4, after determining a region in which each contour point is located, a value of the partial differential equation is calculated, and a contour is evolved through iterations of

$\phi^{n + 1} = {\phi^{n} + {\Delta t\frac{\partial\phi}{\partial t}}}$

until a maximum number of iterations iter 1000 is reached or the contour changes slightly or does not change, and then the segmentation is completed, where a contour change

${{\Delta h} = {\sum\limits_{i,j}\left( {❘{{H\left( \phi_{i,j}^{n + 1} \right)} - {H\left( \phi_{i,j}^{n} \right)}}❘} \right)}},$

which indicates changing of the contour, and the iteration stops in response to a plurality of successive slight changes of the contour.

In this embodiment, FIG. 2 illustrates a standard segmented image, labeled by an experienced doctor. The segmentation result of U-Net in FIG. 3 presents problems of segmentation errors and under-segmentation. However, after using the active contour model, as shown in FIG. 4 , regions with segmentation errors are removed from the result image and the contour is enabled to expand outward in the fuzzy region to cover part of the under-segmented region.

The purpose of the method for automatic segmentation of a fuzzy boundary image based on active contour and deep learning is to enable the segmentation model to segment fuzzy boundary regions while fine-tuning the segmentation contour so that the segmentation contour is as close to the target boundary as possible. The present invention adopts a combination of a deep convolutional network model and an active contour model to enable the model to achieve accurate segmentation results. The experimental data of the present invention are thyroid ultrasonic images, and the data set contains 309 images, of which 150 are used as the training set and the remaining 159 are used as the test set. The U-Net model is trained using the 150 training images, and the trained model segments the 159 test images, and then the U-Net segmentation results are further fine-tuned using the active contour model. The quantitative indexes of the segmentation results are as follows:

${{{Accuracy} = \frac{{TP} + {TN}}{A_{P} + A_{N}}},{{PPV} = \frac{TP}{{TP} + {FP}}},{and}}{{IoU} = \frac{TP}{{FN} + {TP} + {FP}}}$

where TP, TN, FP, FN, A_(p),and A_(N) denote True Positive, True Negative, False Positive, False Negative, All Positive, and All Negative, respectively. The average quantitative indexes obtained after segmentation of the 159 images are as shown in Table 1.

TABLE 1 Quantitative index Accuracy PPV IOU U-Net 0.9922 0.9090 0.8872 The present 0.9933 0.9278 0.9026 invention

As can be seen from the above table, the present invention combines the U-Net model and the active contour model, and achieves a higher accuracy of pixel classification in terms of fine-grained segmentation compared to the approach in which only the U-Net model is used, where Accuracy reaches 0.9933; 0.9278 of the region segmented as the thyroid is the correct thyroid region, with an improvement of 2.78% in accuracy; and the intersection over union of the region that is divided as the thyroid versus the true thyroid region is 0,9026, with an improvement of 1.54% compared to the approach in which only the U-Net model is used. The improvements of the present invention regarding the quantitative indexes Accuracy, PPV, and IOU indicate that the present invention can further improve the accuracy of target segmentation in fuzzy images and can yield fine and accurate segmentation results for fuzzy boundaries. In the present invention, the use of an active contour model based on U-Net leads to better fuzzy boundary image segmentation results. The method for automatic segmentation of a fuzzy boundary image based on active contour and deep learning has the capability of segmenting a fuzzy boundary in a fuzzy boundary image while fine-tuning the segmentation contour to cause the contour to move close to the target boundary. 

What is claimed is:
 1. A method for automatic segmentation of a fuzzy boundary image based on active contour and deep learning, comprising the following steps: S1, segmenting a fuzzy boundary image using a deep learning model to obtain an initialized target segmentation result; and S2, fine-tuning the segmentation result of the model using an active contour model to obtain a more accurate normal boundary and fuzzy boundary segmentation result, the step specifically comprising: S2.1, initializing the active contour model using a region boundary in the initialized target segmentation result obtained in S1 to construct an initial level set; S2.2, using the level set to represent an energy function, and obtaining a partial differential equation for curve evolution through the energy function; S2.3, performing a judgment of a region in which a contour point is located; and S2.4, after determining a region in which each contour point is located, calculating a value of the partial differential equation and evolving a contour through iterations until a maximum number of iterations is reached or the contour changes slightly or does not change, and then completing the segmentation.
 2. The method for automatic segmentation of a fuzzy boundary image based on active contour and deep learning of claim 1, wherein in step S2.1, the initial level set ϕ₁(x,y) of the active contour model is constructed from the segmentation result of the deep learning model, and the initial level set is defined as follows: ${\phi_{I}\left( {x,y} \right)} = \left\{ \begin{matrix} {{D\left( {x,y} \right)},{{R\left( {x,y} \right)} = 0}} \\ {{- {D\left( {x,y} \right)}},{{R\left( {x,y} \right)} = 1}} \end{matrix} \right.$ where R(x,y)={0,1} is the segmentation result of the deep learning model, R(x,y)=0 indicates that a point (x,y) belongs to a target region, and R(x,y)=1 indicates that the point (x,y) belongs to a non-target region; and points at a demarcation between the target region and the non-target region form a target boundary B, and D(x,y) is the shortest distance between each point (x,y) on the image and the target boundary B.
 3. The method for automatic segmentation of a fuzzy boundary image based on active contour and deep learning of claim 1, wherein in step S2.2, a total of three parts are included in the energy function: 1) the perimeter and area of the contour; 2) a contour local region energy; and 3) a contour constraint energy; and the whole energy function is defined as follows: $F = {{{u \cdot {Length}}(C)} + {{v \cdot {Area}}\left( {{inside}(C)} \right)} + \text{ }{\lambda_{1}\left( {{\sum\limits_{p \in {B(C)}}{\int_{{ia}(p)}{{❘{{\mu_{0}\left( {x,y} \right)} - c_{ip}}❘}^{2}{dxdy}}}} + {\sum\limits_{p \in {B(C)}}{\int_{{ia}(p)}{{❘{{\mu_{0}\left( {x,y} \right)} - c_{ip} + c_{1}}❘}{dxdy}}}}} \right)} + {\lambda_{2}\left( {{\sum\limits_{p \in {N(C)}}{\int_{{oa}(p)}{{❘{{\mu_{0}\left( {x,y} \right)} - c_{op}}❘}^{2}{dxdy}}}} + {\sum\limits_{p \in {F(C)}}{\int_{{oa}(p)}{{❘{{\mu_{0}\left( {x,y} \right)} - c_{op} + c_{2}}❘}{dxdy}}}}} \right)} + {\frac{\lambda_{3}}{2}\left( {C - C_{0}} \right)^{2}}}$ where C denotes a current segmentation contour, C₀ denotes an initialized segmentation contour, Length(C) denotes the perimeter of the contour C, Area(inside(C)) denotes the area of a region inside the contour C, μ₀(x,y) is a pixel intensity of a source image I at (X,y), c₁ is a pixel intensity average inside the contour C, c₂ is a pixel intensity average outside the contour C, p is a point on the contour C, p ∈N(C) indicates that the contour point p is in a target edge region, p ∈F(C) indicates that the contour point p is in a foreground (target) region, p ∈B(C) indicates that the contour point p is in a background region, ia(p) is a point that is in the surrounding of the contour point p and inside the contour C, oa(p) is a point that is in the surrounding of the contour point p and outside the contour C, c_(ip) is a pixel intensity average of points that satisfy ia(p), c_(op), is a pixel intensity average of points that satisfy oa(p), the surrounding of the contour point p refers to being in the range of a circle with P as the center and R as the radius; and a first term and a second term in the energy function denote the perimeter and area of the contour and serve to keep the contour continuous and smooth and are related only to the size and shape of the contour itself; a third term and a fourth term in the energy function denote a contour local region energy and serve to cause the contour to evolve towards a target boundary and is related to image data; and a fifth term in the energy function denotes a contour constraint energy and serves to limit the evolution of a current contour towards a region that greatly deviates from the initialized contour, and u, v, λ₁, λ₂, λ₃ are coefficients of the corresponding energy terms.
 4. The method for automatic segmentation of a fuzzy boundary image based on active contour and deep learning of claim 3, wherein in the energy function F, a level set method is used to denote the contour C as well as the inside and outside of the contour; and in the level set method, the contour C in an image domain Ω is denoted as a zero level set, i.e., ϕ=0, which is defined as follows: $\left\{ {\begin{matrix} {C = \left\{ {{\left( {x,y} \right) \in {\Omega:{\phi\left( {x,y} \right)}}} = 0} \right\}} \\ {{{inside}(C)} = \left\{ {\left( {x,y} \right) \in {{\Omega:{\phi\left( {x,y} \right)}} > 0}} \right\}} \\ {{{outside}(C)} = \left\{ {\left( {x,y} \right) \in {{\Omega:\phi\left( {x,y} \right)} < 0}} \right\}} \end{matrix};} \right.$  the zero level set, i.e., ϕ=0, is used to denote the contour C; a Heaviside function H and a Dirac function δ₀ are defined as follows: ${H(z)} = \left\{ {\begin{matrix} {1,} & {{{if}z} \geq 0} \\ 0 & {{{if}z} < 0} \end{matrix},{{{\delta_{0}(z)} = {\frac{d}{dz}{H(z)}}};}} \right.$ H is used to denote the inside and outside of the contour C: $\left\{ {\begin{matrix} {{{inside}(C)} = {{H\left( {\phi\left( {x,y} \right)} \right)} = 1}} \\ {{{outside}(C)} = {{H\left( {\phi\left( {x,y} \right)} \right)} = 0}} \end{matrix};} \right.$ the level set ϕ, the function H, and the function δ₀ are used to denote the perimeter and area of the contour: Length{ϕ = 0} = ∫_(Ω)❘∇H(ϕ(x, y))❘dxdy = ∫_(Ω)δ₀(ϕ(x, y)❘∇ϕ(x, y)❘dxdy; and Area{ϕ > 0} = ∫_(Ω)H(ϕ(x, y))dxdy; the contour constraint energy is the difference between the current contour C and the initialized contour C₀, and is denoted using the level set ϕ, the function H, and ϕ₁, and the contour constraint energy is denoted as the difference between the current level set ϕ and the initialized level set ϕ₁: (C−C ₀)²=∫_(Ω)(H(ϕ(x,y)))−H(ϕ₁(x,y))²dxdy; the contour local region energy is the sum of energies inside and outside the surrounding of all contour points; an energy of surrounding regions of the contour is calculated by calculating, separately for each contour point, energies inside and outside the contour in a local region of the contour point using a local calculation method and then superimposing the energies to obtain an overall energy; and after being denoted using the level set ϕ and the function H, terms in the energy of the surrounding regions of the contour are defined as follows: ${{\sum\limits_{p \in {N(C)}}{\int_{{ia}(p)}{{❘{{\mu_{0}\left( {x,y} \right)} - c_{ip}}❘}^{2}{dxdy}}}} = {\sum\limits_{p \in {N(C)}}{\int_{a(p)}{{❘{{\mu_{0}\left( {x,y} \right)} - c_{ip}}❘}^{2}{H\left( {\phi\left( {x,y} \right)} \right)}{dxdy}}}}};$ ${{\sum\limits_{p \in {B(C)}}{\int_{{ia}(p)}{{❘{{\mu_{0}\left( {x,y} \right)} - c_{ip} + c_{1}}❘}{dxdy}}}} = {\sum\limits_{p \in {B(C)}}{\int_{a(p)}{{❘{{\mu_{0}\left( {x,y} \right)} - c_{ip} + c_{1}}❘}{H\left( {\phi\left( {x,y} \right)} \right)}{dxdy}}}}};$ ${{\sum\limits_{p \in {N(C)}}{\int_{{oa}(p)}{{❘{{\mu_{0}\left( {x,y} \right)} - c_{op}}❘}^{2}{dxdy}}}} = {\sum\limits_{p \in {N(C)}}{\int_{a(p)}{{❘{{\mu_{0}\left( {x,y} \right)} - c_{op}}❘}^{2}\left( {1 - {H\left( {\phi\left( {x,y} \right)} \right)}} \right){dxdy}}}}};{and}$ ${\sum\limits_{p \in {F(C)}}{\int_{{oa}(p)}{{❘{{\mu_{0}\left( {x,y} \right)} - c_{op} + c_{2}}❘}{dxdy}}}} = {\sum\limits_{p \in {F(C)}}{\int_{a(p)}{{❘{{\mu_{0}\left( {x,y} \right)} - c_{op} + c_{2}}❘}\left( {1 - {H\left( {\phi\left( {x,y} \right)} \right)}} \right){dxdy}}}}$ where for a point p(x_(p), y_(p)) on the contour point C, ϕ(p)=0; a(p) denotes a point that is in the surrounding of the contour point p, the surrounding of the contour point p referring to being in the range of a circle with P as the center and R as the radius; ia(p) denotes a point that is in the surrounding of the contour point p and inside the contour C, and for a point a(x_(a), y_(a)) satisfying ia(p), ϕ(x_(a), y_(a))>0 and √{square root over ((x_(a)−x_(p))²+(y_(a)−y_(p))²)}≤R; and oa(p) denotes a point that is in the surrounding of the contour point p and outside the contour C, and for a point a(x_(a),y_(a)) satisfying oa(p), ϕ(x_(a),y_(a))<0 and √{square root over ((x_(a)−x_(p))²+(y_(a)−y_(p))²)}≤R.
 5. The method for automatic segmentation of a fuzzy boundary image based on active contour and deep learning of claim 3, wherein after denoting the energy terms using the level set method, the energy function F is defined as: $F = {{\mu{\int_{\Omega}{{\delta_{0}\left( {\phi\left( {x,y} \right)} \right)}{❘{\nabla{\phi\left( {x,y} \right)}}❘}{dxdy}}}} + {v{\int_{\Omega}{{H\left( {\phi\left( {x,y} \right)} \right)}{dxdy}}}} + {\lambda_{1}\left( {\sum\limits_{p \in {N(C)}}{\int_{a(p)}{{❘{{\mu_{0}\left( {x,y} \right)} - c_{ip}}❘}^{2}{H\left( {\phi\left( {x,y} \right)} \right)}{dxdy}}}} \right.} + {\sum\limits_{p \in {B(C)}}{\int_{a(p)}{{❘{{\mu_{0}\left( {x,y} \right)} - c_{ip} + c_{1}}❘}{H\left( {\phi\left( {x,y} \right)} \right)}{dxdy}}}} + {\lambda_{2}\left( {\sum\limits_{p \in {N(C)}}{\int_{a(p)}{{❘{{\mu_{0}\left( {x,y} \right)} - c_{op}}❘}^{2}\left( {1 - {H\left( {\phi\left( {x,y} \right)} \right)}} \right){dxdy}}}} \right.} + {\sum\limits_{p \in {F(C)}}{\int_{a(p)}{{❘{{\mu_{0}\left( {x,y} \right)} - c_{op} + c_{2}}❘}\left( {1 - {H\left( {\phi\left( {x,y} \right)} \right)}} \right){dxdy}}}} + {\frac{\lambda_{3}}{2}{\int_{\Omega}\left( {H\left( {\phi\left( {x,y} \right)} \right)} \right)}} - {{H\left( {\phi_{I}\left( {x,y} \right)} \right)}^{2}{dxdy}}}$ where c₁ is the pixel intensity average inside the contour C, and c₂ is the pixel intensity average outside the contour c_(ip) which satisfy, respectively: c₁(ϕ)=average (u₀) in {ϕ≥0}, c₂(ϕ)=average (u₀) in {ϕ<0}; and c₁ and c₂ are defined through the level set as follows: ${c_{1} = \frac{\int_{\Omega}{{u_{0}\left( {x,y} \right)}{H\left( {\phi\left( {x,y} \right)} \right)}{dxdy}}}{\int_{\Omega}{{H\left( {\phi\left( {x,y} \right)} \right)}{dxdy}}}};{and}$ $c_{2} = \frac{\int_{\Omega}{{u_{0}\left( {x,y} \right)}\left( {1 - {H\left( {\phi\left( {x,y} \right)} \right)}} \right){dxdy}}}{\int_{\Omega}{\left( {1 - {H\left( {\phi\left( {x,y} \right)} \right)}} \right){dxdy}}}$ where c_(ip) is a pixel intensity average of points satisfying ia(p) and c_(op) is a pixel intensity average of points satisfying oa(p); and c_(ip)(φ)=average(μ₀) in {a(p) and φ≥0} and c_(op)(φ)=average(μ₀) in {a(p) and φ<0} are defined as follows: ${c_{ip} = \frac{\int_{a(p)}{{u_{0}\left( {x,y} \right)}{H\left( {\phi\left( {x,y} \right)} \right)}{dxdy}}}{\int_{a(p)}{{H\left( {\phi\left( {x,y} \right)} \right)}{dxdy}}}};{and}$ ${c_{op} = \frac{\int_{a(p)}{{u_{0}\left( {x,y} \right)}\left( {1 - {H\left( {\phi\left( {x,y} \right)} \right)}} \right){dxdy}}}{\int_{a(p)}{\left( {1 - {H\left( {\phi\left( {x,y} \right)} \right)}} \right){dxdy}}}};$ and a partial differential equation for curve evolution is obtained from the energy function F by means of a Euler-Lagrange variational method and a gradient descent flow as follows: ${\frac{\partial\phi}{\partial t} = {\delta_{\varepsilon}\left\lbrack {{u{div}\left( \frac{\nabla\phi}{❘{\nabla\phi}❘} \right)} - v - {\lambda_{1}\left( {{\sum\limits_{{p \in {N(C)}},{{({x,y})} \in {a(p)}}}\left( {{u_{0}\left( {x,y} \right)} - c_{ip}} \right)^{2}} - {\sum\limits_{{p \in {B(C)}},{{({x,y})} \in {a(p)}}}\left( {{u_{0}\left( {x,y} \right)} - c_{ip} + c_{1}} \right)^{2}}} \right)} + {\lambda_{2}\left( {{\sum\limits_{{p \in {N(C)}},{{({x,y})} \in {a(p)}}}\left( {{u_{0}\left( {x,y} \right)} - c_{ip}} \right)^{2}} - {\sum\limits_{{p \in {F(C)}},{{({x,y})} \in {a(p)}}}\left( {{u_{0}\left( {x,y} \right)} - c_{ip} + c_{2}} \right)^{2}}} \right)} + {\lambda_{3}\left( {{H_{\varepsilon}(\phi)} - {H_{\varepsilon}\left( \phi_{I} \right)}} \right)}} \right\rbrack}},$ where ${{H_{\varepsilon}(z)} = {\frac{1}{2}\left( {1 + {\frac{2}{\pi}{\arctan\left( \frac{z}{\varepsilon} \right)}}} \right)}},{{\delta_{\varepsilon}(z)} = \frac{\varepsilon}{\pi\left( {\varepsilon^{2} + z^{2}} \right)}},$ and (x,y)∈a(p) indicates that the point (x,y) is in the surrounding of the contour point p, the surrounding of the contour point p referring to being in the range of a circle with p as the center and R as the radius; and in the process of curve evolution, the level set of the nth iteration is ϕ″ and the level set of the (n+1)th iteration is ${\phi^{n + 1} = {\phi^{n} + {{\Delta t}\frac{\partial\phi}{\partial t}}}},$ and partial derivatives in the horizontal direction and the vertical direction of a two-dimensional image are calculated using a finite difference approach.
 6. The method for automatic segmentation of a fuzzy boundary image based on active contour and deep learning of claim 1, wherein in step S2.3, it is judged whether the contour point p is in a target edge region or a non-target edge region by the difference between pixel intensities inside and outside the contour, and the specific method is as follows: in the fuzzy boundary image, the difference between the pixel intensity averages inside and outside the surrounding of the contour is larger in the target edge region, while the difference between the pixel intensity averages inside and outside the surrounding of the contour is smaller in the non-target edge region; and when the contour point p is in the non-target edge region, the values of c_(ip) and c_(op) are close to each other, i.e., c_(ip)≈c_(op), |c_(ip)−c_(op)|≤c_(d), c_(d) being a threshold for judging whether c_(ip) is close to c_(op), and the judgment is performed through the following steps: S2.3.1, calculating the difference d_(p) between c_(ip) and c_(op) for each contour point on the contour in counterclockwise order, and constructing a closed-loop queue D in an order obtained through d_(p); S2.3.2, smoothing the closed-loop queue D using a Gaussian filter of width R; S2.3.3, searching for a fragment ΔC that is longer than 2R and satisfies d_(p)≤c_(d) in the closed-loop queue D; and S2.3.4, if there exists a fragment satisfying step S2.33, all contour points in the fragment are in the non-target edge region and the other contour points are in the target edge region; and the sum of energies inside the contour in local regions of contour points in the target edge region is as follows: ${\sum\limits_{p \in {N(C)}}{\int_{a(p)}{{❘{{\mu_{0}\left( {x,y} \right)} - c_{ip}}❘}^{2}{H\left( {\phi\left( {x,y} \right)} \right)}{dxdy}}}};$ and the sum of energies outside the contour in local regions of contour points in the target edge region is as follows: $\sum\limits_{p \in {N(C)}}{\int_{a(p)}{{❘{{\mu_{0}\left( {x,y} \right)} - c_{op}}❘}^{2}\left( {1 - {H\left( {\phi\left( {x,y} \right)} \right)}} \right){{dxdy}.}}}$
 7. The method for automatic segmentation of a fuzzy boundary image based on active contour and deep learning of claim 6, wherein in response to the contour point p being in the non-target edge region, it is further determined whether the contour point p is in a foreground region or a background region; and since the characteristics of a surrounding region of a contour point are similar to those of a region in which the contour point is located, the fuzzy boundary image is divided into several subregions according to image characteristics, and then, for these subregions, it is determined whether the contour point p is in the foreground region or the background region, and the specific method is as follows: S2.3.5, firstly, dividing the fuzzy boundary image into several subregions according to image characteristics, and determining a subregion O in which the contour fragment ΔC is located: S2.3.6, establishing a two-dimensional coordinate system in the image subregion O with the coordinate position of a contour point in the middle of the contour fragment ΔC as the center point center (x₀, y₀) of a two-dimensional Gaussian function ƒ(x,y), with ⅙ of the maximum distance of x₀ from a boundary of the subregion as the standard deviation σ_(x) as of the X-axis portion of the Gaussian function, and with ⅙ of the maximum distance of y₀ from the boundary of the subregion as the standard deviation σ_(y) of the Y-axis portion of the Gaussian function; and assigning a weight w_(ij) to each point in the subregion using the two-dimensional Gaussian function and normalizing weights w_(ij) for the inside and outside of the contour, respectively, to obtain normalized weights w_(ij_in) for the inside of the contour and normalized weights w_(ij_out) for the outside of the contour; S2.3.7, calculating averages c_(o1) and c_(o2) for the inside and outside of the contour in the subregion O using the normalized weights w_(ij_in) and w_(ij_out) and a pixel intensity μ₀(i,j), wherein when the point (i,j) is inside the contour in the subregion O), ${c_{o1} = \frac{\sum{w_{ij\_ in} \cdot {\mu_{0}\left( {i,j} \right)}}}{N}},$ N being the number of points inside the contour in the subregion O; and when the point (i,j) is outside the contour in the subregion O, ${c_{o^{2}} = \frac{\sum{w_{ij\_ out} \cdot {\mu_{0}\left( {i,j} \right)}}}{M}},$ M being the number of points outside the contour in the subregion O; and S2.3.8, calculating a pixel intensity average m_(Δc), of surrounding regions of all contour points in the contour fragment ΔC, and comparing the differences between m_(Δc) and c_(o1) and c_(o2), wherein if |m_(Δc)−c_(o1)|≤|m_(Δc)−c_(o2)|, the contour points in the contour fragment ΔC are in the foreground region, and otherwise in the background region.
 8. The method for automatic segmentation of a fuzzy boundary image based on active contour and deep learning of claim 7, wherein if the contour point p is in the foreground region, the direction of evolution of the contour point p is towards the outside of the contour, wherein in the energy function, the correction of the direction of evolution is embodied in increasing the energy of the outside of the contour in a local region of the foreground contour point, with the increased energy being defined as: ${\sum\limits_{p \in {F(C)}}{\int_{a(p)}{{❘{{\mu_{0}\left( {x,y} \right)} - c_{op} + c_{2}}❘}\left( {1 - {H\left( {\phi\left( {x,y} \right)} \right)}} \right){dxdy}}}};$ and if the contour point p is in the background region, the direction of evolution of the contour point p is towards the inside of the contour, wherein in the energy function, the correction of the direction of evolution is embodied in increasing the energy of the inside of the contour in a local region of the background contour point, with the increased energy being defined as: $\sum\limits_{p \in {B(C)}}{\int_{a(p)}{{❘{{\mu_{0}\left( {x,y} \right)} - c_{ip} + c_{1}}❘}{H\left( {\phi\left( {x,y} \right)} \right)}{dxdy}{).}}}$
 9. The method for automatic segmentation of a fuzzy boundary image based on active contour and deep learning of claim 1, wherein in step S2.4, the contour is evolved through iterations of $\phi^{n + 1} = {\phi^{n} + {{\Delta t}\frac{\partial\phi}{\partial t}}}$ until a maximum number of iterations iter is reached or the contour changes slightly or does not change, where 200≤iter≤10000; and a contour change ${{\Delta h} = {\sum\limits_{i,j}\left( {❘{{H\left( \phi_{i,j}^{n + 1} \right)} - {H\left( \phi_{i,j}^{n} \right)}}❘} \right)}},$ which indicates changing of the contour, and the iteration stops in response to a plurality of successive slight changes of the contour. 